Skip to content

Conversation

@sanchit-gandhi
Copy link
Contributor

This PR fixes a bug in a Flax-Speech-Encoder-Decoder test that was failing after push (https://github.com/huggingface/transformers/runs/5493110105?check_suite_focus=true). Specifically, it amends the test_freeze_feature_encoder test to omit the random decoder_attention_mask from the input arguments of the speech-encoder-decoder model. This random decoder_attention_mask was resulting in nan values on the output logits of the FlaxWav2Vec2BartModelTest. Removing it as an input results in real valued output logits, and the test of concern passes following this change. The behaviour of the FlaxBartForCausalLM model to output nan values given a random decoder_attention_mask has been noted.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 10, 2022

The documentation is not available anymore as the PR was closed or merged.

):
self.assertTrue((feature_extractor_grad_frozen == 0.0).all())
self.assert_difference(feature_extractor_grad, feature_extractor_grad_frozen, 1e-8)
self.assert_difference(feature_extractor_grad, feature_extractor_grad_frozen, 1e-10)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to make it that aggressive btw :-) We usually are happy with 1e-4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! I just set it in-tandem with the assert_almost_equals threshold that is run for the unfrozen gradients.

@sanchit-gandhi sanchit-gandhi merged commit 1da84ae into huggingface:master Mar 10, 2022
@sanchit-gandhi sanchit-gandhi deleted the flax-speech-encoder-decoder branch March 10, 2022 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants